#api-list {
  min-height: 200px;
  padding: 0 10px;
  box-sizing: border-box;
}

details {
  clear: both;

  summary {
    cursor: default;
    outline: none;
    font-size: large;
    color: #444;
    display: block;
    padding: 10px;
    background-color: #ffffff;
    transition: background-color 618ms;
  }

}

.module-name:before,
.route-name:before {
  padding: 2px 5px;
  border-radius: 2px;
  margin: 0 5px;
  vertical-align: 1px;
  background: #ececec;
  color: #636363;
}

.module-name:before {
  content: '模块';
  font-size: 13px;
}

.route-name:before {
  content: '路由';
  font-size: 12px;
}

.route-description,
.return-info {
  background-color: #fafafa;
  padding: 10px;
  border-radius: 4px;
  line-height: 1.6;
}

.route-count {
  margin-left: 20px;
  font-size: 12px;
  line-height: 1;
  color: #0977c0;
}


#api-list {
  &[data-select-type='1'] .url-info .url,
  &[data-select-type='2'] .url-info .url-prefix-with-slash,
  &[data-select-type='3'] .url-info .url-prefix,
  &[data-select-type='4'] .url-info .url-path-with-slash,
  &[data-select-type='5'] .url-info .url-path {
    user-select: all;
    border-bottom: 1px dotted;
  }
}

.method {
  text-transform: uppercase;
  color: #e90588;
  padding: 0 5px;
}

.method-get {
  .method {
    color: #16930a;
  }

  .url {
    color: #16930a;
  }
}

.method-post {
  .method {
    color: #0989f7;
  }

  .url {
    color: #0989f7;
  }
}

.method-put {
  .method {
    color: #06b0c1;
  }

  .url {
    color: #06b0c1;
  }
}

.method-delete {
  .method {
    color: #f9512b;
  }

  .url {
    color: #f9512b;
  }
}

.args-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;

  caption {
    text-align: left;
    padding-bottom: 5px;
  }

  th {
    font-weight: normal;
  }
}

.arg-type.is-variable {
  color: #d462f2;
}

.arg-type.is-enum {
  border-bottom: 1px dotted;
  cursor: pointer;

  &:hover, &:active {
    border-bottom-style: solid;
  }
}

.required-field {
  color: rgb(211, 5, 5);
}

.arg-name {
  padding: 2px 3px;
}

.api-items {
  li.module-item {
    list-style: simp-chinese-informal;

    //&::marker {
    //  color: #0787fd;
    //  font-weight: bold;
    //}
  }
}

@keyframes anim-hide {
  0% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(0);
    opacity: 0;
    height: 0;
  }
}

@keyframes anim-show {
  0% {
    transform: scaleY(0);
    height: 0;
    opacity: 0;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
    height: auto;
  }
}

.route-description, .addition-info, .args-table, .return-info {
  animation-fill-mode: forwards;
  animation-duration: 618ms;
  animation-timing-function: ease-in-out;
  height: 0;
  overflow: hidden;
}

.api-item {
  &.collapsed {
    margin-bottom: 0;

    .addition-info, .args-table, .return-info, .route-description {
      display: block;
      animation-name: anim-hide;
      overflow: hidden;
      margin: 0;
      padding: 0;
    }
  }

  &.expanded {
    .addition-info, .args-table, .return-info, .route-description {
      animation-name: anim-show;
    }
  }
}

.api-item-title {
  cursor: default;
  display: flex;
  align-items: center;

  &:hover {
    background-color: rgba(0, 0, 0, .2);
  }

  .anchor {
    width: 20px;
    text-align: center;
    flex: 0 0 auto;
  }

  &:hover {
    .api-item-arrow {
      &:before, &:after {
        border-color: transparent #0787fd #0787fd transparent;
      }
    }
  }
}

.route-name {
  flex: 1 1 auto;
}

.api-item-arrow {
  display: inline-block;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  position: relative;
  cursor: pointer;
  transition: transform 312ms;

  &:before, &:after {
    content: '';
    position: absolute;
    display: inline-block;
    border-color: transparent rgba(142, 194, 246, 0.74) rgba(142, 194, 246, 0.74) transparent;
    border-width: 1px;
    border-style: solid;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    transition: border-color 618ms;
  }

  &:before {
    top: 9px;
    left: 8px
  }

  &:after {
    top: 3px;
    left: 8px
  }
}

.collapsed {
  .api-item-arrow {
    transform: rotate(-90deg);
  }
}

details summary:hover {
  background-color: rgba(0, 0, 0, .2);
}

details summary:hover .anchor,
details ol li:hover .anchor {
  opacity: 1;
}

details ol li.api-item {
  border-left: 1px dotted transparent;
  list-style: decimal-leading-zero;
  padding-left: 5px;
  padding-top: 10px;
  margin-bottom: 40px;

  //&::marker {
  //  color: #0787fd;
  //}

  &:hover {
    border-left-color: #539fdd;

    .btn-open-test {
      opacity: 1;
    }
  }
}

details[open] {
  margin-bottom: 20px;

  summary {
    position: sticky;
    top: -1px;
    border-bottom: 1px solid #eee;
    z-index: 1;
  }
}

.url-info {
  display: flex;
  flex-direction: row;
  margin: 15px 0;
  align-items: center;
}

.info {
  padding: 5px 0;
  border-radius: 2px;
  transition: background-color 200ms;
  will-change: background-color;
  flex: 1 1 auto;

  &:hover {
    background-color: #fdf4ff;
  }
}

.btn-open-test {
  width: 60px;
  flex: 0 0 auto;
}

.addition-info {
  margin: 15px 5px;
}

.comment {
  font-size: 12px;
  color: #555555;

  pre {
    line-height: 1.4;
    margin: 5px 0;
    padding: 0 5px;
  }
}

.route-name {
  font-size: 15px;
  margin-right: 10px;
}

.return-info {
  font-size: 1em;
  line-height: 1.6;

  code {
    margin-right: 5px;
  }
}

#current-anchor {
  font-weight: bold;
  box-shadow: 0 0 10px 2px rgba(180, 180, 180, 0.58);
}

.theme-dark {
  details summary {
    background-color: #555555;
    color: #eee;

    &:hover {
      background-color: #626262;
    }
  }

  details[open] summary {
    border-bottom-color: #4a4a4a;
  }

  //details ol li::marker,
  //.api-items li.module-item::marker {
  //  color: #3f86cc;
  //}

  .anchor {
    color: #3f86cc;
  }

  .module-name:before,
  .route-name:before {
    color: #ececec;
    background-color: #717070;
  }

  .route-description,
  .return-info {
    background-color: #505050;
  }

  .info:hover {
    background-color: #444145;
  }

  .required-field {
    color: #ff7d7d;
  }

  .arg-type.is-variable {
    color: #ff57f4;
  }

  .route-count {
    color: #6bbbf0;
  }
}
